﻿<UserControl x:Class="RS.UI.Hierarchy"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:RS.UI">

    <UserControl.Resources>
        
        <HierarchicalDataTemplate x:Key="dtLayer">
            <Grid Background="{StaticResource Brush_ControlBackground}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="20"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" x:Name="txtName" Text="{Binding Name}" VerticalAlignment="Center"/>
                <Image Grid.Column="1" x:Name="imgIsVisible" Width="18" Height="18" Source="../../images/hierarchy/visibleOn.png" Margin="2"/>
                <Image Grid.Column="2" x:Name="imgIsLocked" Width="18" Height="18" Source="../../images/Hierarchy/lockOn.png" Margin="2"/>
            </Grid>
        </HierarchicalDataTemplate>
        
        <HierarchicalDataTemplate x:Key="dtNode">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="20"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" x:Name="icon" Width="18" Height="18" Source="../../images/hierarchy/node.png"/>
                <TextBlock Grid.Column="1" x:Name="txtName" VerticalAlignment="Center"/>
                <Image Grid.Column="2" x:Name="imgIsVisible" Width="18" Height="18" Source="../../images/hierarchy/visibleOn.png" Margin="2"/>
                <Image Grid.Column="3" x:Name="imgIsLocked" Width="18" Height="18" Source="../../images/Hierarchy/lockOn.png" Margin="2"/>
            </Grid>
        </HierarchicalDataTemplate>
        
        <HierarchicalDataTemplate x:Key="dtGeometry">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="20"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" x:Name="icon" Width="18" Height="18" Source="../../images/hierarchy/geometry.png"/>
                <TextBlock Grid.Column="1" x:Name="txtName" VerticalAlignment="Center"/>
                <Image Grid.Column="2" x:Name="imgIsVisible" Width="18" Height="18" Source="../../images/hierarchy/visibleOn.png" Margin="2"/>
                <Image Grid.Column="3" x:Name="imgIsLocked" Width="18" Height="18" Source="../../images/Hierarchy/lockOn.png" Margin="2"/>
            </Grid>
        </HierarchicalDataTemplate>


        <HierarchicalDataTemplate x:Key="dtLight">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="20"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" x:Name="icon" Width="18" Height="18" Source="../../images/hierarchy/light.png"/>
                <TextBlock Grid.Column="1" x:Name="txtName" VerticalAlignment="Center"/>
                <Image Grid.Column="2" x:Name="imgIsVisible" Width="18" Height="18" Source="../../images/hierarchy/visibleOn.png" Margin="2"/>
                <Image Grid.Column="3" x:Name="imgIsLocked" Width="18" Height="18" Source="../../images/Hierarchy/lockOn.png" Margin="2"/>
            </Grid>
        </HierarchicalDataTemplate>


        <HierarchicalDataTemplate x:Key="dtCamera">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="20"/>
                    <ColumnDefinition Width="20"/>
                </Grid.ColumnDefinitions>
                <Image Grid.Column="0" x:Name="icon" Width="18" Height="18" Source="../../images/hierarchy/camera.png"/>
                <TextBlock Grid.Column="1" x:Name="txtName" VerticalAlignment="Center"/>
                <Image Grid.Column="2" x:Name="imgIsVisible" Width="18" Height="18" Source="../../images/hierarchy/visibleOn.png" Margin="2"/>
                <Image Grid.Column="3" x:Name="imgIsLocked" Width="18" Height="18" Source="../../images/Hierarchy/lockOn.png" Margin="2"/>
            </Grid>
        </HierarchicalDataTemplate>

    </UserControl.Resources>

    <TreeView x:Name="tree"/>

</UserControl>
